package com.css.bjdt_core.executive;

import com.css.bjdt_core.cell.entity.Cell;
import com.css.bjdt_core.report.entity.RptTemplateUnitRela;
import com.css.bjdt_core.util.TimeUtil;

public class QuoteExecutor extends DefaultExecutor {

	@Override
	public String execute(Cell cell, RptTemplateUnitRela templateUnitRela) {
		String startTime = TimeUtil.dateFormatString(templateUnitRela.getStartTime());
		String endTime = TimeUtil.dateFormatString(templateUnitRela.getEndTime());
		//String startEndTime = templateUnitRela.getStartEndTimeStr();
		String startEndTime = "起止时间：" + startTime + "至" + endTime;
		String fullName = "填报单位：" + templateUnitRela.getFullName();
		String relMan = "联系人：" + templateUnitRela.getRelMan();
		switch (cell.getQuoteType()) {
		case "3":
			return "开始时间：" + startTime;
		case "2":
			return "截止时间：" + endTime;
		case "1":
			return fullName;
		case "5":
			return relMan;
		case "4":
			return startEndTime;
		default:
			return "";
		}
	}

}
